package com.newly.api.business.feign;

import com.newly.common.base.constants.ServerUriConstant;
import com.newly.common.base.entity.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Api(tags = "MQTT-黑名单管理")
@FeignClient(path = ServerUriConstant.NEWLY_BUSINESS_MQTT_BlackList, name = ServerUriConstant.NEWLY_BUSINESS_SERVICE_NAME)
public interface MQTTBlackListClient {

    @ApiOperation("获取黑名单")
    @PostMapping("/getBlackList")
    R getBlackList(@RequestParam(value = "productKey", required = false) String productKey,
                   @RequestParam(value = "start", required = false) int start,
                   @RequestParam(value = "limit", required = false) int limit);

    @ApiOperation("修改黑名单")
    @PostMapping("/modifyBlackList")
    R modifyBlackList(@RequestParam(value = "productKey", required = false) String productKey,
                      @RequestParam(value = "index", required = false) int index,
                      @RequestParam(value = "plateNo", required = false) String plateNo);

    @ApiOperation("删除黑名单")
    @PostMapping("/deleteBlackList")
    R deleteBlackList(@RequestParam(value = "productKey", required = false) String productKey,
                      @RequestParam(value = "index", required = false) int index);

    @ApiOperation("添加黑名单")
    @PostMapping("/addBlackList")
    R addBlackList(@RequestParam(value = "productKey", required = false) String productKey,
                   @RequestParam(value = "plate", required = false) String[] plate);
}
